package com.dao;

import java.util.HashMap;
import java.util.List;

import com.model.Article;
import com.model.Tag;
import com.util.Page;

public interface ArticleDAO {

	public Article add(Article article);

	public Article update(Article article);

	public int delete(int id);

	public Article findById(int id);

	public Article findByIdWithUser(int id);

	public void addTag(int articleId, int tagId);

	public void deleteTag(int articleId, int tagId);

	public boolean isTagExist(int articleId, int tagId);

	public Page findPageByUserId(int userId, int page, int pageSize, boolean isPublic);

	public List<Article> findCollectPageByUserId(int userId, int page, int pageSize);

	public void makePublic(int articleId, boolean isPublic);

	public void addFavorNum(int articleId);

	public void addAgreeNum(int articleId);

	public void addDisagreeNum(int articleId);

	public void addCollectNum(int articleId);

	public void reduceCollectNum(int articleId);

	public List<HashMap> findByIds(String articleIds);

	public List<Tag> findTagsByArticleId(int articleId);

	public void addCommentNum(int aid);

	public List findNewArticleTopN(int topN);

	public List findHotArticleTopN(int topN);

}
